package com.dms.modules.product.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@ApiModel(value = "ProductReviewDTO", description = "商品评价DTO")
public class ProductReviewDTO {
    
    @ApiModelProperty("订单ID")
    @NotNull(message = "订单ID不能为空")
    private Long orderId;
    
    @ApiModelProperty("商品ID")
    @NotNull(message = "商品ID不能为空")
    private Long productId;
    
    @ApiModelProperty("SKU ID")
    @NotNull(message = "SKU ID不能为空")
    private Long skuId;
    
    @ApiModelProperty("评分：1-5星")
    @NotNull(message = "评分不能为空")
    @Min(value = 1, message = "评分最小为1星")
    @Max(value = 5, message = "评分最大为5星")
    private Integer rating;
    
    @ApiModelProperty("评价内容")
    private String content;
    
    @ApiModelProperty("评价图片列表")
    private List<String> images;
    
    @ApiModelProperty("是否匿名：0-否 1-是")
    private Integer anonymous = 0;
} 